﻿Imports System
Imports System.ComponentModel.Design.Serialization
Imports System.Drawing
Imports System.Workflow.ComponentModel.Serialization

Namespace System.Workflow.ComponentModel.Design
    Friend NotInheritable Class ThemeSerializationProvider
        Inherits WorkflowMarkupSerializationProvider
        ' Methods
        Public Overrides Function GetSerializer(ByVal manager As IDesignerSerializationManager, ByVal currentSerializer As Object, ByVal objectType As Type, ByVal serializerType As Type) As Object
            If serializerType.IsAssignableFrom(GetType(WorkflowMarkupSerializer)) Then
                If (GetType(Color) Is objectType) Then
                    Return New ColorMarkupSerializer
                End If
                If (GetType(Size) Is objectType) Then
                    Return New SizeMarkupSerializer
                End If
            End If
            Return MyBase.GetSerializer(manager, currentSerializer, objectType, serializerType)
        End Function

    End Class
End Namespace

